package cn.com.jenson.web.login.controller;

import cn.com.jenson.common.Result;
import cn.com.jenson.dao.login.bo.LoginBo;
import cn.com.jenson.dao.login.vo.LoginVo;
import cn.com.jenson.service.auth.service.LoginService;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import javax.annotation.Resource;
import javax.servlet.http.HttpSession;

@RestController
@RequestMapping("/api/login")
public class LoginController {

    @Resource
    LoginService loginService;

    @PostMapping("/web_login")
    public Result<LoginVo> webLogin(@RequestBody LoginBo loginBo) throws InstantiationException, IllegalAccessException {
        return Result.suc(loginService.webLogin(loginBo));
    }
}
